﻿@{
    ViewBag.Title = "Home Page";
}

<div class="row" id="list" style="margin-top:300px;">
    <div class="col-md-4">
        <h2>用户管理</h2>
        <p>
            集合所有的人脸资料管理<br><br>
        </p>
        <p><a class="btn btn-default" href="/Home/Face">点 我</a></p>
    </div>
    <div class="col-md-4">
        <h2>录入人脸资料</h2>
        <p>
            1、本地电脑上传图片上传（pc）<br>
            2、从手机相册或现场拍照上传（phone）
        </p>
        <p><a class="btn btn-default" href="/Home/AddFace">点 我</a></p>
    </div>
    <div class="col-md-4">
        <h2>识别人脸</h2>
        <p>
            1、本地电脑上传图片识别（pc）<br>
            2、从手机相册或现场拍照识别（phone）
        </p>
        <p><a class="btn btn-default" href="/Home/SearchFace">点 我</a></p>
    </div>
</div>

@section scripts{
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript">
        $(function () {
            browserRedirect();
            function browserRedirect() {
                var sUserAgent = navigator.userAgent.toLowerCase();
                var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
                var bIsMidp = sUserAgent.match(/midp/i) == "midp";
                var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
                var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
                var bIsAndroid = sUserAgent.match(/android/i) == "android";
                var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
                var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                var NokiaBrowser = sUserAgent.match(/NokiaBrowser/i) == "nokianrowser";
                var NOKIA = sUserAgent.match(/NOKIA/i) == "nokia";

                if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM || NokiaBrowser || NOKIA) {
                    $("#list").css("margin-top", '0px');

                } else {
                    console.log("pc");
                }
            }        })

    </script>
}